Skip to content

Build for iOS, visionOS and the MLX trait in CI - #4

Merged
Juanpe merged 1 commit into
mainfrom
ci/platform-builds
Oct 23, 2026
Merged

Juanpe merged 1 commit into
mainfrom
ci/platform-builds

Conversation

@Juanpe

@Juanpe Juanpe commented Oct 22, 2026

Copy link
Copy Markdown
Owner

🎯 What

Two new jobs in the Tests workflow, on the xcode-27 runner:

  • build (iOS) / build (visionOS): xcodebuild build for ModelRelay, ModelRelayHTTP, ModelRelayCloud and ModelRelayMCP against generic/platform=…. The job fails if the log has a warning from Sources/ModelRelay*/.
  • build (MLX trait): downloads the Metal Toolchain, then runs swift build --traits MLX --target ModelRelayMLX -Xswiftc -warnings-as-errors.

🤔 Why

swift test only compiles for macOS. The package promises iOS 18 and visionOS 2 with newer Apple APIs availability-gated, and nothing checked that. The MLX trait was never compiled in CI either.

🧪 How it was tested

Locally with Xcode 27.0:

  • All 8 library builds (4 products × iOS, visionOS) pass, with 0 warnings from package sources.
  • The warning filter catches a deliberately unused let in Sources/ModelRelay (Probe.swift:2:9: warning: …).
  • The MLX build passes in about 1m40s. Its only warnings come from mlx-swift's C++ headers, outside our sources.

📣 Notes for review

  • Why a filter instead of a flag: SWIFT_TREAT_WARNINGS_AS_ERRORS=YES on the command line applies to every target. It conflicts with -suppress-warnings in dependencies (EventSource, swift-collections), so the job filters the build log for the package's own sources instead.
  • Macros: -skipMacroValidation is needed for dependency macros in a non-interactive build.
  • MLX is compile-only: inference still needs supported hardware and weights, as Documentation/Releasing.md says.
  • First CI run: this PR's run is the first test of these jobs on GitHub, including whether the preview image can download the Metal Toolchain.

🤖 Generated with Claude Code

swift test only compiles for macOS, so an availability mistake on iOS 18
or visionOS 2 could pass CI. Build each library for both platforms and
reject warnings from the package's own sources. Also compile
ModelRelayMLX with its trait and the Metal Toolchain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Juanpe
Juanpe merged commit 8774823 into main Oct 23, 2026
4 checks passed
@Juanpe
Juanpe deleted the ci/platform-builds branch October 23, 2026 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant